''' Practice PT #5 - part 1 Using a list of lists ''' from botcore import * from time import sleep motors.enable(True) delay = 2.0 square_speeds = [[30, 30, delay], [20, -20, 0.72], [30, 30, delay], [20, -20, 0.72], [30, 30, delay], [20, -20, 0.72], [30, 30, delay], [20, -20, 0.72]] def move(the_list): for item in the_list: left_speed = item[0] right_speed = item[1] the_delay = item[2] motors.run(LEFT, left_speed) motors.run(RIGHT, right_speed) sleep(the_delay) # countdown def countdown(): leds.user_num(4, True) sleep(1.0) leds.user_num(3, True) sleep(1.0) # -- Main Program -- countdown() while True: if buttons.was_pressed(0): leds.user_num(0, True) motors.enable(True) move(square_speeds) motors.enable(False)